package org.jeecg;

import java.io.IOException;
import java.util.concurrent.TimeoutException;
import com.alibaba.fastjson.JSONObject;
import com.rabbitmq.client.*;
import ctp.thosttraderapi.CThostFtdcTradeField;
import org.jeecg.modules.API.until.RabbitmqProduUntil;
import org.jeecg.modules.API.until.RabbitmqUntil;



public class SampleTest{

    static Channel channel = null;
    public static void main(String[] arg) throws IOException, TimeoutException, InterruptedException {

        System.loadLibrary("thostmduserapi_se");
        System.loadLibrary("thostmduserapi_wrap");
        System.loadLibrary("thosttraderapi_se");
        System.loadLibrary("thosttraderapi_wrap");

        CThostFtdcTradeField pTrade = new CThostFtdcTradeField();
        pTrade.setBrokerID("123456");

        JSONObject js = new JSONObject();
        js.put("pTrade",pTrade);
        channel = RabbitmqUntil.getMqChannel();

        System.out.println("fasong");
        RabbitmqProduUntil.productMsg("zcc", "js", js);
        RabbitmqProduUntil.productMsg("zcc", "js1", js);
    }

}
